<?php
#                                                                                 
# author: Cody Sorgenfrey                                       
# (c)2013 South Hill Calvary Chapel                                               
#                                                                                 
include_once("../mysql/database_info.php");
include_once("../mysql/common.php");
connect_select_test("events");
$result = mysql_query("SELECT * FROM `registrationForms` WHERE `event` LIKE '".$_GET['tableID']."%'");
if (mysql_num_rows($result) == 1){
	echo "Single Table";
} else {
	$string = "";
	for ($x=0;$x<mysql_num_rows($result);$x++){
		$string .= "<button onclick='addNewRow(\"";
		$string .= mysql_result($result, $x, "event");
		$string .= "\")'>";
		$string .= mysql_result($result, $x, "formName");
		$string .= "</button>";
	}
	echo $string;
}
?>